home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / T-TPUG Old Monthly Disks / (c)t8.d64 / break out 1.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  3KB  |  157 lines

  1. 0 REM MODIFIED FOR 64 BY STEVE HUGHES
  2. 1 SC=0:BL=9:POKE53281,0:POKE53280,2
  3. 2 PRINT"[147]                BREAKOUT"
  4. 3 GOSUB60000
  5. 4 PRINT"[147]DO YOU WANT INSTRUCTIONS (Y=YES,N=NO)  ":INPUTIN$:GOTO1100
  6. 5 PP=17:BD=41:BP=1449:S=1024:PM=0:S=54272:POKES+24,15
  7. 6 A$="  [182]":B$="[181]"
  8. 7 O1=1024:W=0:B5=0
  9. 10 PRINT"[147]"
  10. 15 PRINT"   ";:FORN=1TO32:PRINT" [146]";:NEXTN:PRINT" "
  11. 16 PRINT"   ";:FORN=1TO32:PRINT"[159] [146]";:NEXTN:PRINT" "
  12. 25 PRINT"   ";:FORN=1TO32:PRINT"[158][166]";:NEXTN:PRINT" "
  13. 26 PRINT"   ";:FORN=1TO32:PRINT"[166]";:NEXTN:PRINT" "
  14. 35 PRINT"   ";:FORN=1TO32:PRINT"[129] [146]";:NEXTN:PRINT" "
  15. 36 PRINT"   ";:FORN=1TO32:PRINT"[151] [146]";:NEXTN:PRINT" "
  16. 45 PRINT"";
  17. 46 PRINT"  [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
  18. 48 FORN=1TO23
  19. 49 PRINTA$;:PRINTTAB(35);B$
  20. 50 NEXTN
  21. 65 PRINT""TAB(20)"BALLS-LEFT="BL
  22. 67 IFYP<>1GOTO80
  23. 70 PRINT""
  24. 75 PRINTTAB(PP);" [183][183][183][183] ";
  25. 77 GOTO100
  26. 80 PRINT"  [163][163][163][163][163][163][163][163][163][163][163][163][163][163][208]    [207][163][163][163][163][163][163][163][163][163][163][163][163][163][163]";
  27. 100 IFYP<>1GOTO102:REM MAIN ROUTINE
  28. 101 GOSUB200:REM MOVE PADDLE
  29. 102 IFW>=96GOTO1000
  30. 103 BP=BP+BD
  31. 104 IFBP>2023GOTO135
  32. 107 PK=PEEK(BP)
  33. 109 IFPK=32THENKK=1
  34. 110 IFPK=96THENKK=1
  35. 111 IFKK=1GOTO114
  36. 112 GOSUB300:REM BOUNCE
  37. 113 IFPEEK(BP)<>32GOTO103
  38. 114 KK=0
  39. 115 POKEBO,32
  40. 121 POKEBP,81:POKE54272+BP,1
  41. 122 BO=BP:IFYP<>1GOTO100
  42. 124 IFB5>10GOTO100
  43. 125 GOSUB200:REM MOVE PADDLE
  44. 130 GOTO100
  45. 135 BL=BL-1:GOSUB9000:REM SOUND
  46. 136 B5=0
  47. 137 PRINT"";"BALLS-LEFT=";BL"[157][157][157]0"
  48. 138 POKEBO,32
  49. 140 IFBL<=0GOTO800
  50. 141 TIM$="000000"
  51. 142 IFYP=1THENGOSUB200
  52. 143 IFTI<100GOTO142
  53. 145 BP=1426+INT(20*RND(1)+1)
  54. 150 BD=39+2*INT(RND(1)+.5)
  55. 155 GOTO100
  56. 200 XA=PEEK(56320):XA=XAAND15
  57. 203 IF B5>10GOTO 211
  58. 205 IFXA=11THENPM=-1
  59. 206 IFXA=15THENPM=0
  60. 207 IFXA=7THENPM=+1
  61. 210 GOTO 216
  62. 211 IFXA=11THENPM=-2
  63. 212 IFXA=15THENPM=+0
  64. 213 IFXA=7THENPM=+2
  65. 216 AB=0
  66. 220 PP=PP+PM
  67. 225 IF PP<=0 THEN PP=0
  68. 230 IF PP>=30 THEN PP=30
  69. 235 PRINT""
  70. 236 PRINTTAB(PP);"  [207][163][163][208][160] ";
  71. 240 RETURN
  72. 300 SC=SC+1
  73. 301 POKES+5,96:POKES+6,240:POKES+3,8:POKES+2,45
  74. 302 FORZZ=1TO25STEP5
  75. 303 POKES,45:POKES+1,ZZ:POKES+4,65
  76. 304 NEXTZZ
  77. 309 POKES+4,64
  78. 310 B5=B5+1
  79. 320 IFPK=118GOTO340:REM LT SIDE
  80. 324 IFPK=117GOTO360:REM RT SIDE
  81. 334 IFPK=79GOTO390:REM PADDLE
  82. 335 IFPK=99GOTO390
  83. 336 IFPK=80GOTO390
  84. 339 GOTO376:REM TOP OR POINTS
  85. 340 IFBD<0GOTO350
  86. 345 BD=41:BP=BO:GOTO450
  87. 350 BD=-39:BP=BO:GOTO450
  88. 360 IFBD<0GOTO370
  89. 365 BD=39:BP=BO:GOTO450
  90. 370 BD=-41:BP=BO:GOTO450
  91. 376 IFPK=160GOTO405
  92. 377 SC=SC+10
  93. 378 IFPK=102GOTO405
  94. 379 IFBD=-41GOTO385
  95. 380 BD=41:BP=BO:GOTO450
  96. 385 BD=39:BP=BO:GOTO450
  97. 390 IFPK=79GOTO401
  98. 391 IFPK=80GOTO402
  99. 393 IFBD=39GOTO400
  100. 395 BD=-39:BP=BO:GOTO450
  101. 400 BD=-41:BP=BO:GOTO450
  102. 401 BD=-41:BP=BO:GOTO450
  103. 402 BD=-39:BP=BO:GOTO450
  104. 405 SC=SC+10
  105. 410 IFBD=-39GOTO420
  106. 411 IFBD=-41GOTO425
  107. 412 IFBD=39GOTO430
  108. 413 BD=-39:GOSUB900
  109. 417 GOTO450
  110. 420 BD=41:GOSUB900
  111. 424 GOTO450
  112. 425 BD=39:GOSUB900
  113. 428 GOTO450
  114. 430 BD=-41:GOSUB 900
  115. 434 GOTO450
  116. 450 PRINT"SCORE="SC
  117. 455 RETURN
  118. 800 GETA$:GETA$:GETA$
  119. 801 FORZ=1TO3000:NEXTZ:IFYP=0THENSC=0:BL=9:GOTO5:REM A NEW GAME FOR COMPUTER DEMO
  120. 802 PRINT""TAB(12)"PLAY AGAIN?";:INPUTY$:SC=0:BL=9
  121. 805 IFLEFT$(Y$,1)="Y"GOTO1122
  122. 810 END
  123. 900 POKEBP+(2*(BP-2*(INT(BP/2))-.50)),32
  124. 902 W=W+1
  125. 903 POKEBP,32:POKE54272+BP,1
  126. 905 BP=BO:RETURN
  127. 1000 REM
  128. 1020 GOTO5
  129. 1100 A=A
  130. 1105 IFLEFT$(IN$,1)<>"Y"GOTO1125
  131. 1110 PRINT"   USE THE JOYSTICK TO HIT THE BLOCKS"
  132. 1115 PRINT"PRESS ANY KEY TO CONTINUE"
  133. 1120 GETC$:IFC$=""GOTO1120
  134. 1122 YP=0
  135. 1125 INPUT"DO YOU WANT A PADDLE";P$
  136. 1130 IFLEFT$(P$,1)="Y"THENYP=1
  137. 1135 GOTO5
  138. 9000 POKES+5,96:POKES+6,240
  139. 9020 FORQQ=1TO5
  140. 9030 FORWW=55TO75STEP10
  141. 9040 POKES,23:POKES+1,WW:POKES+4,17
  142. 9050 NEXTWW,QQ:POKES+4,16:RETURN
  143. 60000 S$="        ":PRINTCHR$(142);
  144. 60010 PRINTS$"[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
  145. 60020 [153]S$"(null)  TOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOTO  (null)
  146. 60030 PRINTS$"[221] [206]                 [205] [221]
  147. 60040 [153]S$"(null) FNPET CASSETTE EXCHTHEN (null)
  148. 60050 PRINTS$"[221] [165]1929 NORTHPORT DR[167] [221]
  149. 60060 [153]S$"(null) FN (null)RIGHT$ ORTANTANTANTANTANTANTAN^ (null)RIGHT$ THEN (null)
  150. 60070 PRINTS$"[221] [165] [202][203] [173][192][192][192][192][192][192][192][189] [202][203] [167] [221]
  151. 60080 [153]S$"(null) FN     ROOM  6     THEN (null)
  152. 60090 PRINTS$"[221] [165]MADISON, WI 53704[167] [221]
  153. 60092 [153]S$"(null) LENLENLENLENLENLENLENLENLENLENLENLENLENLENLENLENLENLENLEN (null)
  154. 60094 PRINTS$"[221]   [215] [215]          [215] [215]  [221]
  155. 60096 [153]S$"MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
  156. 60098 FORQ=1TO999:NEXT:PRINT"[147]":RETURN
  157.